﻿<div class="row">
    <div class="col-md-12" style="margin: 10px 0px 10px 0px;">
        <form class="form-inline" role="form" data-ng-submit="loadBanks();">
            <div class="form-group">
                <label class="col-sm-2 control-label" for="exampleInputPassword2">Поиск</label>
            </div>
          <div class="form-group">
            <input type="text" class="form-control" id="exampleInputPassword2" data-ng-model="name" placeholder="Название">
          </div>
          <div class="form-group">
            <button type="button" class="btn" data-ng-click="loadBanks();">Поиск</button>
          </div>
          <div class="form-group">
            <button type="button" class="btn" data-ng-click="$state.transitionTo('banks.new');">Добавить новый</button>
          </div>
        </form>
    </div>
</div>




<div class="row">
    <div class="col-md-12" data-ng-switch="" data-on="banks.length">
        <p data-ng-switch-when="0">Банков нет</p>
        <table data-ng-switch-default="" class="table table-hover table-bordered">
            <thead>
                <tr>
                    <th>Код</th>
                    <th>Название</th>
                    <th>Информация</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <tr data-ng-repeat="bank in banks">
                    <td>
                        {{bank.Code}}
                    </td>
                    <td>
                        {{bank.Name}}
                    </td>
                    <td>
                        {{bank.Info}}
                    </td>
                    <td>
                        <a href="#/banks/{{bank.Code}}" class="glyphicon glyphicon-edit"></a>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>

<div class="row">
    <div class="col-md-12" style="margin: 10px 0px 10px 0px;">
        <div data-ui-view="manager"></div>
    </div>
</div>
